import request from '@/utils/request'

// 查询银行卡列表
export function listBankCard(query) {
  return request({
    url: '/personnel/bankCard/list',
    method: 'get',
    params: query
  })
}

// 查询银行卡详细
export function getBankCard(id) {
  return request({
    url: '/personnel/bankCard/' + id,
    method: 'get'
  })
}

// 新增银行卡
export function addBankCard(data) {
  return request({
    url: '/personnel/bankCard',
    method: 'post',
    data: data
  })
}

// 修改银行卡
export function updateBankCard(data) {
  return request({
    url: '/personnel/bankCard',
    method: 'put',
    data: data
  })
}

// 删除银行卡
export function delBankCard(id) {
  return request({
    url: '/personnel/bankCard/' + id,
    method: 'delete'
  })
}

//根据开户人查询银行卡信息
export function getBankCardByAccountHolder(name) {
  return request({
    url: '/personnel/bankCard/selectEBankCardByAccountHolder/' + name,
    method: 'get'
  })
}
